 {$cleo .cS}


const

ticking_bomb = 13@
DISARMED_sound = 14@
BOMB_FAIL_sound = 16@
BOMB_FAIL_sound2 = 20@
LUIGI_zombie_sound = 21@
LUIGI_zombie_sound2 = 22@   
bomb_done = 9@
bomb = 10@
end
bomb_done = 0

04ED: load_animation  "BOMBER"



model.Load(#COLT45)
023C: load_special_actor 'psycho' as 5 // models 290-299

038B: load_requested_models
0006: 7@ = 0 
009A: 0@ = create_actor_pedtype 23 model #SPECIAL05 at  3706.0078 -1218.4348 1611.6909
0173: set_actor 0@ Z_angle_to  5.4244
0223: set_actor 0@ health_to 2000 
0638: AS_actor 0@ stay_put 1 
077C: clear_actor 0@ acquaintance 4 to_all_pedtypes // see ped.dat 
077C: clear_actor 0@ acquaintance 3 to_all_pedtypes // see ped.dat 
077C: clear_actor 0@ acquaintance 2 to_all_pedtypes // see ped.dat 
077C: clear_actor 0@ acquaintance 1 to_all_pedtypes // see ped.dat 
0006: 32@ = 0 
0AAD: set_mp3 1@ perform_action 1 
060A: create_decision_maker_type 0 store_to 11@ // decision\allowed\m_.ped files 
0978: copy_decision_maker 11@ to 9@ 
060B: set_actor 0@ decision_maker_to 9@ 
0446: set_actor 0@ dismemberment_possible 0 
0006: 33@ = 0 
081A: set_actor 0@ weapon_skill_to 3

0245: set_actor 0@ walk_style_to "player" 
0296: unload_special_actor 5 
0209: 17@ = random_int_in_ranges 0 14

ticking_bomb = audiostream.Load3D("cleo\battle_maps\bomb_ticking.mp3")
audiostream.LinkToActor(ticking_bomb,0@)
DISARMED_sound = audiostream.Load3D("cleo\battle_maps\disarmed.mp3")
audiostream.LinkToActor(DISARMED_sound,0@)
BOMB_FAIL_sound = audiostream.Load3D("cleo\battle_maps\alert_bomb.mp3")
audiostream.LinkToActor(BOMB_FAIL_sound,0@)
BOMB_FAIL_sound2 = audiostream.Load3D("cleo\battle_maps\bomb_drop.mp3")
audiostream.LinkToActor(BOMB_FAIL_sound2,0@)
LUIGI_zombie_sound = audiostream.Load3D("cleo\battle_maps\luigitacodead.mp3")
audiostream.LinkToActor(LUIGI_zombie_sound,0@)
LUIGI_zombie_sound2 = audiostream.Load3D("cleo\battle_maps\luigi3.wav")
audiostream.LinkToActor(LUIGI_zombie_sound2,0@)
audiostream.Loop(ticking_bomb,1)
audiostream.Loop(LUIGI_zombie_sound2,1)
audiostream.Loop(LUIGI_zombie_sound,1)
bomb_done = 0
0209: 18@ = random_int_in_ranges 0 26



:start_random


wait 0
0209: 18@ = random_int_in_ranges 0 26
if
18@ == 0 
then
00A1: put_actor 0@ at   3711.9026 -1235.9248 1631.6909
actor.Angle(0@) =  0.4244
jump @main
end
if
18@ == 1 
then
00A1: put_actor 0@ at 3716.2539 -1116.0092 1631.6909
actor.Angle(0@) = 80.0858 
jump @main
end
if
18@ == 2
then
00A1: put_actor 0@ at  3662.3311 -1095.7952 1631.668
actor.Angle(0@) =  276.659
jump @main
end
if
18@ == 3
then
00A1: put_actor 0@ at 3678.9033 -1069.1223 1631.668
actor.Angle(0@) =  180.659
jump @main
end
if
18@ == 4
then
00A1: put_actor 0@ at  3676.2283 -1025.2056 1631.668
actor.Angle(0@) =  8.3466
jump @main
end
if
18@ == 5
then
00A1: put_actor 0@ at 3614.0669 -992.6868 1638.3688
actor.Angle(0@) = 277.3367   
//actor.GiveWeaponAndAmmo(0@, pistol,99999)
jump @main
end
if
18@ == 6
then
00A1: put_actor 0@ at  3635.7554 -961.3732 1631.668
actor.Angle(0@) =  229.744
jump @main
end
if
18@ == 7
then
00A1: put_actor 0@ at 3885.2478 -1031.8191 1631.668
actor.Angle(0@) = 356.7801 
jump @main
end
if
18@ == 8
then
00A1: put_actor 0@ at 3898.814 -961.2783 1631.668
actor.Angle(0@) =  176.4675
jump @main
end
if
18@ == 9
then
00A1: put_actor 0@ at 3912.1838 -990.8677 1638.3688
actor.Angle(0@) = 200.9199 
jump @main
end
if
18@ == 10
then
00A1: put_actor 0@ at 3879.8928 -1056.2274 1638.3688
actor.Angle(0@) = 1.0267 
jump @main
end
if
18@ == 11
then
00A1: put_actor 0@ at  3824.575 -1047.5474 1638.3688
actor.Angle(0@) =  126.1434
jump @main
end
if
18@ == 12
then
00A1: put_actor 0@ at 3758.3445 -1114.1721 1638.3688
actor.Angle(0@) =  355.6349
jump @main
end
if
18@ == 13
then
00A1: put_actor 0@ at 3750.7488 -1151.9561 1631.6388
actor.Angle(0@) = 172.9552 
jump @main
end
if
18@ == 14
then
00A1: put_actor 0@ at 3666.3313 -1095.3871 1591.1787 
actor.Angle(0@) =  176.9061
jump @main
end

if
18@ == 15
then
00A1: put_actor 0@ at  3705.198 -1108.2512 1591.1787
actor.Angle(0@) =  51.4671
jump @main
end
if
18@ == 16
then
00A1: put_actor 0@ at  3885.5383 -899.1163 1631.6102
actor.Angle(0@) =  328.6934 //done
jump @main
end
if
18@ == 17
then
00A1: put_actor 0@ at 3995.5703 -905.3035 1647.6255
actor.Angle(0@) =  278.9565
jump @main
end
if
18@ == 18
then
00A1: put_actor 0@ at 3915.5222 -818.4858 1631.5281
actor.Angle(0@) =   18.7383
jump @main
end

if
18@ == 19
then
00A1: put_actor 0@ at 3780.3906 -616.783 1631.6254 //airport hanger v1
actor.Angle(0@) =   173.6826
jump @main
end
if
18@ == 20
then
00A1: put_actor 0@ at  3700.5769 -637.5023 1639.2499 //top plane
actor.Angle(0@) =    179.5205
jump @main
end
if
18@ == 21
then
00A1: put_actor 0@ at  3525.7905 -633.1093 1631.6075  //hanger v1
actor.Angle(0@) =  95.1693
jump @main
end
if
18@ == 22
then
00A1: put_actor 0@ at  3476.2263 -607.1573 1631.5203
actor.Angle(0@) =  174.4972
jump @main
end
if
18@ == 23
then
00A1: put_actor 0@ at 3577.7686 -909.8511 1642.9554
actor.Angle(0@) =   243.2953
jump @main
end

if
18@ == 24
then
00A1: put_actor 0@ at 3688.7859 -916.7862 1630.6101
actor.Angle(0@) =   243.1674
jump @main
end
if
18@ == 25
then
00A1: put_actor 0@ at  3769.7793 -1043.7052 1631.668
actor.Angle(0@) =   95.3418
jump @main
end
jump @start_random


:main
04C4: store_coords_to 3@ 4@ 5@ from_actor 0@ with_offset 0.0 0.0 0.0 
0AE1: 19@ = random_actor_near_point 3@ 4@ 5@ in_radius 8.0 find_next 1 pass_deads 1
if
056D:   actor 19@ defined
then
if 
0A1B:   actor 19@ colliding_with_actor 0@

then

jump @start_random
end
end

:base
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -1 
04C4: store_coords_to 3@ 4@ 5@ from_actor 0@ with_offset 0.0 0.0 0.0 
wait 0
//gosub @get_players 
if
$onmission == 0
then
:1
audiostream.Release(ticking_bomb)
audiostream.Release(DISARMED_sound)
audiostream.Release(BOMB_FAIL_sound)
audiostream.Release(BOMB_FAIL_sound2)
audiostream.Release(LUIGI_zombie_sound)
audiostream.Release(LUIGI_zombie_sound2)

actor.DestroyInstantly(0@)
end_thread
end
if
$actor_sweet == 0

then
0A92: create_custom_thread "battle_maps\airport_luigi_bomb1.cs"

jump @1 
end

:bomb_disarmed
if and
bomb_done == 0
0105:   actor $player_Actor near_actor 0@ radius 3.0 3.0 1.3 sphere 0 on_foot
056D:   actor $player_Actor  defined
then
0ACD: show_text_highpriority "~r~Player one: ~w~Press ~y~~k~~VEHICLE_ENTER_EXIT~~w~ to disfuse the bomb." time 500

if  
00E1:   player 0 pressed_key 15

then
00BE: text_clear_all

31@ = actor.EmulateFromPlayer($player_char)
jump @disfuse_bomb
end

end
:bomb_disarmed2
if  and
bomb_done == 0
056D:   actor $second_player_Actor  defined
then
if
0105:   actor $second_player_Actor near_actor 0@ radius 3.0 3.0 1.3 sphere 0 on_foot
then
0ACD: show_text_highpriority "~b~Player two: ~w~Press ~y~~k~~VEHICLE_ENTER_EXIT~~w~ to disfuse the bomb." time 500

if  
00E1:   player 1 pressed_key 15

then
00BE: text_clear_all

31@ = actor.EmulateFromPlayer($second_player)
jump @disfuse_bomb
end
end
end
if
actor.Dead(0@)
then
$ryder_car += 1
0948: create_explosion_at 3@ 4@ 5@ type 11 camera_shake 3.0 
jump @1
end
jump @base





:get_players
0209: 30@ = random_int_in_ranges 0 2

if
30@ == 0
then
31@ = actor.EmulateFromPlayer($player_char)
end
if  and
056D:   actor $second_player_Actor  defined
30@ == 1
then
31@ = actor.EmulateFromPlayer($second_player)

end
return


:disfuse_bomb
wait 0
if
056D:   actor 31@  defined
jf @main 
0615: define_AS_pack_begin 15@
0812: AS_actor -1 perform_animation "BOM_Plant" IFP "bomber" framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1  // versionB
0616: define_AS_pack_end 15@

0618: assign_actor 31@ to_AS_pack 15@
061B: remove_references_to_AS_pack 15@
wait 2700

:random_sets
0209: 17@ = random_int_in_ranges 0 14
wait 0 
if 
17@ == 0
then
 
jump @fail_0_times
end
if 
17@ == 1
then
 
jump @fail2
end
if 
17@ == 2
then
 
jump @slight_pass
end
if 
17@ == 3
then
 
jump @pass
end
if 
17@ == 4
then
 
jump @slight_pass
end
if 
17@ == 5
then
jump @slight_pass2 

end
if 
17@ == 6
then
 
jump @slight_pass
end
if 
17@ == 7
then
 
jump @fail
end
if 
17@ == 8
then
 
jump @slight_pass2
end
if 
17@ == 9
then
 
jump @pass
end
if 
17@ == 10
then
 
jump @pass
end
if 
17@ == 11
then
 
jump @pass
end
if 
17@ == 12
then
 
jump @fail
end
if 
17@ == 13
then
 
jump @pass
end
jump @random_sets


jump @main

:fail2
//actor.Health(0@) = 999999999999

audiostream.PerformAction(ticking_bomb,play)
wait 4500     
audiostream.PerformAction(ticking_bomb,stop)                                   
audiostream.PerformAction(LUIGI_zombie_sound,play)
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -1 
wait 5000
//bomb_done = 1
04C4: store_coords_to 3@ 4@ 5@ from_actor 0@ with_offset 0.0 0.0 0.0 
0948: create_explosion_at 3@ 4@ 5@ type 11 camera_shake 3.0 
$Sweet_Car += 1
jump @1 
jump @base


:pass
audiostream.PerformAction(ticking_bomb,play)
wait 2500     
audiostream.PerformAction(ticking_bomb,stop)                                   
audiostream.PerformAction(DISARMED_sound,play)
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -1 
$ryder_car += 1
bomb_done = 1


jump @base


:fail
audiostream.PerformAction(ticking_bomb,play)
wait 2500     
audiostream.PerformAction(ticking_bomb,stop)                                   
audiostream.PerformAction(LUIGI_zombie_sound,play)
//actor.Health(0@) = 999999999999
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -1 
wait 5000
04C4: store_coords_to 3@ 4@ 5@ from_actor 0@ with_offset 0.0 0.0 0.0 
0948: create_explosion_at 3@ 4@ 5@ type 11 camera_shake 3.0 


$Sweet_Car += 1
jump @1 
jump @base


:fail_0_times
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -1 
//wait 5000
04C4: store_coords_to 3@ 4@ 5@ from_actor 0@ with_offset 0.0 0.0 0.0 
0948: create_explosion_at 3@ 4@ 5@ type 11 camera_shake 3.0 

$Sweet_Car += 1
jump @1
jump @base


:slight_pass
audiostream.PerformAction(ticking_bomb,play)
wait 4500     
audiostream.PerformAction(ticking_bomb,stop)                                   
audiostream.PerformAction(DISARMED_sound,play)
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -1 
$ryder_car += 1

bomb_done = 1


jump @base

:slight_pass2
audiostream.PerformAction(ticking_bomb,play)
wait 4500     
audiostream.PerformAction(ticking_bomb,stop)                                   
audiostream.PerformAction(BOMB_FAIL_sound,play)
0605: actor 0@ perform_animation "IDLE_stance" IFP "ped" framedelta 4.0 loop 0 lockX 0 lockY 0 lockF 1 time -1 
$ryder_car += 1

bomb_done = 1


jump @base

//gosub @player_open   
{:bomb
if
056D:   actor 31@  defined

then
if
0642:   actor 31@ at_AS_origin 15@
then

end
end
if
856D: not  actor 31@  defined
then

end
if
856D: not  actor 31@  defined
then

end

jump @bomb     }


:player_open
if
856D:  not actor 31@  defined
then


end
return





























